<?php
namespace Rate\Controller;
use Todo\Controller\CurdController;

class UserController extends CurdController {

    public function _before_add(){
        $proId = I('get.project_id/d');
        if(!$proId) return;
        $this->assign('project', D('Todo/Rate/Project')->keyFind($proId));

        $type = I('get.type/s');
        if(!$type) return;
        $this->assign('list', D('Todo/Rate/User')->where(array('project_id'=>$proId,'type'=>$type))->select());
    }
}